package tgc.edu.yzy.service;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import tgc.edu.yzy.custom.CommonService;
import tgc.edu.yzy.entity.Grade;
import tgc.edu.yzy.repository.GradeRepository;
@Service
public class GradeService extends CommonService<Grade, Integer>{
	@Autowired
	private GradeRepository gradedao;

	public List<Grade> findByStudentId(Integer integer) {
		System.out.println("ssss");
		List<Grade> grade=gradedao.findByStudentId(integer);
		return grade;
	}

	public Page<Grade> findByTeacherId(Integer id, Pageable pageable) {
		return gradedao.findByTeacherId(id, pageable);
	}

	public List<Grade> findByTeacherId(Integer teacherid) {
		return gradedao.findByTeacherId(teacherid);
	}


	
	/*public List<Grade> findByTeacherId(Integer id){
		return gradedao.findByTeacherId(id);
		
	}*/
}
